package com.ruoyi.kucun.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kucun.mapper.InventoryWarningLogMapper;
import com.ruoyi.kucun.domain.InventoryWarningLog;
import com.ruoyi.kucun.service.IInventoryWarningLogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存预警记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class InventoryWarningLogServiceImpl implements IInventoryWarningLogService 
{
    @Autowired
    private InventoryWarningLogMapper inventoryWarningLogMapper;

    /**
     * 查询库存预警记录
     * 
     * @param id 库存预警记录主键
     * @return 库存预警记录
     */
    @Override
    public InventoryWarningLog selectInventoryWarningLogById(Long id)
    {
        return inventoryWarningLogMapper.selectInventoryWarningLogById(id);
    }

    /**
     * 查询库存预警记录列表
     * 
     * @param inventoryWarningLog 库存预警记录
     * @return 库存预警记录
     */
    @Override
    public List<InventoryWarningLog> selectInventoryWarningLogList(InventoryWarningLog inventoryWarningLog)
    {
        return inventoryWarningLogMapper.selectInventoryWarningLogList(inventoryWarningLog);
    }

    /**
     * 新增库存预警记录
     * 
     * @param inventoryWarningLog 库存预警记录
     * @return 结果
     */
    @Override
    public int insertInventoryWarningLog(InventoryWarningLog inventoryWarningLog)
    {
        return inventoryWarningLogMapper.insertInventoryWarningLog(inventoryWarningLog);
    }

    /**
     * 修改库存预警记录
     * 
     * @param inventoryWarningLog 库存预警记录
     * @return 结果
     */
    @Override
    public int updateInventoryWarningLog(InventoryWarningLog inventoryWarningLog)
    {
        return inventoryWarningLogMapper.updateInventoryWarningLog(inventoryWarningLog);
    }

    /**
     * 批量删除库存预警记录
     * 
     * @param ids 需要删除的库存预警记录主键
     * @return 结果
     */
    @Override
    public int deleteInventoryWarningLogByIds(String ids)
    {
        return inventoryWarningLogMapper.deleteInventoryWarningLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除库存预警记录信息
     * 
     * @param id 库存预警记录主键
     * @return 结果
     */
    @Override
    public int deleteInventoryWarningLogById(Long id)
    {
        return inventoryWarningLogMapper.deleteInventoryWarningLogById(id);
    }
}
